package com.huayanginfo.saas.domain;

import java.sql.Timestamp;
import java.util.LinkedHashSet;
import java.util.Set;

import com.huayanginfo.saas.domain.member.User;
import com.huayanginfo.saas.domain.share.Share;


/**
 * @author rabbit
 *
 */
public class Activity extends Share implements java.io.Serializable{
	private static final long serialVersionUID = -4628043035915563321L;
	private Integer id;
	private String description;
	private Timestamp createTimestamp;
	private Set<Comment> comments = new LinkedHashSet<Comment>();
	private Set<Attachment> attatchments = new LinkedHashSet<Attachment>();
	private User creator;
	
	//获取留言数量
	public int getCommentNumber() {
		return comments == null? 0: comments.size();
	}
	
	public Set<Comment> getComments() {
		return comments;
	}

	public void setComments(Set<Comment> comments) {
		this.comments = comments;
	}

	public Set<Attachment> getAttatchments() {
		return attatchments;
	}

	public void setAttatchments(Set<Attachment> attatchments) {
		this.attatchments = attatchments;
	}

	public User getCreator() {
		return creator;
	}

	public void setCreator(User creator) {
		this.creator = creator;
	}

	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}

	public Timestamp getCreateTimestamp() {
		return createTimestamp;
	}

	public void setCreateTimestamp(Timestamp createTimestamp) {
		this.createTimestamp = createTimestamp;
	}

}
